package kortsoft.culcon.model;

import java.util.HashSet;
import java.util.Set;

public class Game {

	private Integer gameCode;
	private String name;
	private Set<Player> players;
	
	public Integer getGameCode() {
		return gameCode;
	}
	public void setGameCode(Integer gameCode) {
		this.gameCode = gameCode;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Set<Player> getPlayers() {
		return players;
	}
	public void setPlayers(Set<Player> players) {
		this.players = players;
	}
	public void addPlayer(Player player) {
		if (getPlayers()==null) {
			this.players = new HashSet<Player>();			
		}
		this.players.add(player);
	}
}
